<%@ Page language="c#" Codebehind="MemberSearch.aspx.cs" AutoEventWireup="false" Inherits="CommunityServer.ControlPanel.Membership.MemberSearch" %>
<%@ Register TagPrefix="ComponentArt" Namespace="ComponentArt.Web.UI" Assembly="ComponentArt.Web.UI" %>
<%@ Register TagPrefix="CS" Namespace="CommunityServer.Controls" Assembly="CommunityServer.Controls" %>
<%@ Register TagPrefix="CP" Namespace="CommunityServer.ControlPanel.Controls" Assembly="CommunityServer.Web" %>
<cp:controlpanelselectednavigation selectednavitem="SearchMembers" runat="server" id="SelectedNavigation1" />
<CS:MPContainer runat="server" id="MPContainer" ThemeMasterFile="SetupControlPanelMaster.ascx">
<CS:MPContent id="DescriptionRegion" runat="server">
	<cp:resourcecontrol runat="server" resourcename="CP_MemberSearch_Title" />
</CS:MPContent>
<CS:MPContent id="TaskRegion" runat="Server">
<cs:contextmenu id="MemberContextMenu" runat="server" filename="~/ControlPanel/Membership/MemberSearchContextMenu.config" />
<SCRIPT type="text/javascript">
<!--
function popupMenu(item, e, UserID, SearchPostsUrl)
{
window.<%=MemberContextMenu.ClientID%>.ShowContextMenu(item, e, UserID, SearchPostsUrl);
}
var actionsName = '<cp:resourcecontrol runat="server" resourcename="CP_MemberSearch_GridCol_Actions" />';
-->
</SCRIPT>

<div class="CommonFormArea">
	<cs:usersearch id="UserSearchControl" runat="Server" destinationurl="MemberSearch.aspx"></cs:usersearch>
</div>

<TABLE cellSpacing="0" cellPadding="0" width="100%" border="0">
<TR>
	<TD width="100%">
		<cp:resourcelabel id="DescResourceLabel" runat="server" resourcename="CP_Membership_Roles_ItemsPerPage"></cp:resourcelabel>&nbsp; 
		<asp:dropdownlist id="PageList" runat="Server" AutoPostBack="True">
			<asp:listitem value="10">10</asp:listitem>
			<asp:listitem value="20">20</asp:listitem>
			<asp:listitem value="30">30</asp:listitem>
			<asp:listitem value="40">40</asp:listitem>
			<asp:listitem value="50">50</asp:listitem>
		</asp:dropdownlist>
	</TD>
</TR>
</TABLE><BR>
<DIV id="GridWithMenu">
<DIV id="GrayGrid">
<componentart:grid id="Grid1" runat="Server" cssclass="Grid" runningmode="Callback" showheader="false" showsearchbox="false" searchtextcssclass="GridHeaderText" searchonkeypress="true" headercssclass="GridHeader" footercssclass="GridFooter" groupbycssclass="GroupByCell" groupbytextcssclass="GroupByText" pagerstyle="Slider" pagertextcssclass="GridFooterText" pagerbuttonwidth="41" pagerbuttonheight="22" sliderheight="20" sliderwidth="150" slidergripwidth="9" sliderpopupoffsetx="20" groupingpagesize="5" preexpandongroup="true" imagesbaseurl="~/controlpanel/images/caimages" pagerimagesfolderurl="~/controlpanel/images/caimages/pager" treelineimagesfolderurl="~/controlpanel/images/caimages/lines" treelineimagewidth="22" treelineimageheight="19" indentcellwidth="22" groupingnotificationtextcssclass="GridHeaderText" groupbysortascendingimageurl="group_asc.gif" groupbysortdescendingimageurl="group_desc.gif" groupbysortimagewidth="10" groupbysortimageheight="10" loadingpanelclienttemplateid="Loading" loadingpanelposition="MiddleCenter" AllowEditing="false" AllowMultipleSelect="false" EditOnClickSelectedItem="false" ManualPaging="true">
	<levels>
		<componentart:gridlevel datakeyfield="UserID" showtableheading="false" showselectorcells="false" rowcssclass="Row" columnreorderindicatorimageurl="reorder.gif" datacellcssclass="DataCell" headingcellcssclass="HeadingCell" headingcellhovercssclass="HeadingCellHover" headingcellactivecssclass="HeadingCellActive" headingrowcssclass="HeadingRow" headingtextcssclass="HeadingCellText" selectedrowcssclass="SelectedRow" groupheadingcssclass="GroupHeading" sortascendingimageurl="asc.gif" sortdescendingimageurl="desc.gif" sortimagewidth="10" sortimageheight="19" editcellcssclass="EditDataCell" editfieldcssclass="EditDataField" editcommandclienttemplateid="EditCommandTemplate" insertcommandclienttemplateid="InsertCommandTemplate" alternatingrowcssclass="AlternatingRow" allowsorting="true" allowreordering = "false" allowgrouping="false">
			<columns>
				<componentart:gridcolumn width="150" datafield="Username" headingtext="ResourceManager.CP_MemberSearch_GridCol_Username" datacellclienttemplateid = "UsernameTemplate" />
				<componentart:gridcolumn width="170" datafield="Email" headingtext="ResourceManager.CP_MemberSearch_GridCol_Email" datacellclienttemplateid = "EmailTemplate" />
				<componentart:gridcolumn width="50" datafield="TotalPosts" headingtext="ResourceManager.CP_MemberSearch_GridCol_Posts" datacellclienttemplateid = "PostsTemplate"/>
				<componentart:gridcolumn width="70" datafield="DateCreated" headingtext="ResourceManager.CP_MemberSearch_GridCol_Joined" FormatString="M/d/yyyy" />
				<componentart:gridcolumn width="70" datafield="LastActivity" headingtext="ResourceManager.CP_MemberSearch_GridCol_LastActive" formatstring="M/d/yyyy" />
				<componentart:gridcolumn width="70" headingtext="ResourceManager.CP_MemberSearch_GridCol_Actions" allowsorting="false" datacellclienttemplateid = "ActionsTemplate" />
				<componentart:gridcolumn datafield="UserID" visible = "false" allowsorting="false" />
				<componentart:gridcolumn datafield="SearchPostsUrl" visible = "false" allowsorting="false" />
			</columns>
		</componentart:gridlevel>
	</levels>
	<clienttemplates>
		<componentart:clienttemplate id="Loading">
			<img src = "../images/caimages/spinner.gif" /><strong>Loading</strong>...please wait.
		</componentart:clienttemplate>
		<componentart:clienttemplate id="UsernameTemplate">
			<a href="UserEdit.aspx?UserID=## DataItem.GetMember("UserID").Text ##">## DataItem.GetMember("Username").Text ##</a>
		</componentart:clienttemplate>
		<componentart:clienttemplate id="EmailTemplate">
			<a href="mailto:## DataItem.GetMember("Email").Text ##">## DataItem.GetMember("Email").Text ##</a>
		</componentart:clienttemplate>
		<componentart:clienttemplate id="PostsTemplate">
			<a href="## DataItem.GetMember("SearchPostsUrl").Text ##">## DataItem.GetMember("TotalPosts").Text ##</a>
		</componentart:clienttemplate>		
		<componentart:clienttemplate id="ActionsTemplate">
			<a href="#" oncontextmenu="popupMenu(this, event, '## DataItem.GetMember("UserID").Text ##', '## DataItem.GetMember("SearchPostsUrl").Text ##');" onclick="popupMenu(this, event, '## DataItem.GetMember("UserID").Text ##', '## DataItem.GetMember("SearchPostsUrl").Text ##'); return false" class="CommonTextButton">##actionsName##</a>
		</componentart:clienttemplate>
	</clienttemplates>
</componentart:grid>
</DIV>
</DIV>
</CS:MPContent>
</CS:MPContainer>
